package ${entity.junitTestPackageName};

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import com.etcn.BaseJunit4Test;
import ${entity.servicePackageName}.I${entity.className}Service;
import ${entity.entityPackageName}.${entity.className};

public class ${entity.className}Test extends BaseJunit4Test {

	@Autowired
    private I${entity.className}Service service;
    
    @Test
    public void getByIdTest() throws Exception{
    	long id = 1;
    	service.getById(id);
    }

    @Test
    public void findTest() throws Exception{
    	${entity.className} entity = new ${entity.className}();
    	entity.setId(1L);
    	service.find(entity);
    }

    @Test
    public void findListTest() throws Exception{
    	${entity.className} entity = new ${entity.className}();
    	entity.setId(1L);
    	service.findList(entity);
    }

    @Test
    public void findAllListTest() throws Exception{
    	service.findAllList();
    }

    @Test
    public void insertTest() throws Exception{
    	${entity.className} entity = new ${entity.className}();
    	service.insert(entity);
    }

    @Test
    public void updateTest() throws Exception{
    	${entity.className} entity = new ${entity.className}();
    	entity.setId(1L);
    	service.update(entity);
    }

    @Test
    public void updateByIdTest() throws Exception{
    	${entity.className} entity = new ${entity.className}();
    	entity.setId(1L);
    	service.updateById(entity);
    }

    @Test
    public void deleteByIdTest() throws Exception{
    	long id = 1L;
    	service.deleteById(id);
    }

    @Test
    public void deleteTest() throws Exception{
    	${entity.className} entity = new ${entity.className}();
    	entity.setId(1L);
    	service.delete(entity);
    }

    @Test
    public void deleteLogicallyByIdTest() throws Exception{
    	long id = 1L;
    	service.deleteLogicallyById(id);
    }

    @Test
    public void deleteLogicallyTest() throws Exception{
    	${entity.className} entity = new ${entity.className}();
    	entity.setId(1L);
    	service.deleteLogically(entity);
    }

    
}